import matplotlib.pyplot as plt
import numpy as np
import os
plt.rcdefaults()
IMG_DIR = "extracted_images/h1_try"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 22, 50), color="red")
IMG_DIR = "extracted_images/h1"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 21.5, 50), color="red")
IMG_DIR = "extracted_images/h2"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 27, 25), color="red")
IMG_DIR = "extracted_images/h3"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 27, 25), color="red")
IMG_DIR = "extracted_images/h4"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 24.5, 40), color="red")
IMG_DIR = "extracted_images/h5_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 24.5, 40), color="red")
IMG_DIR = "extracted_images/h6"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 24.5, 35), color="red")
IMG_DIR = "extracted_images/h7"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 25, 35), color="red")
IMG_DIR = "extracted_images/h7_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 25, 35), color="red")
IMG_DIR = "extracted_images/h8_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 24.5, 35), color="red")
IMG_DIR = "extracted_images/h9_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 25, 35), color="red")
IMG_DIR = "extracted_images/h10_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 25, 35), color="red")
IMG_DIR = "extracted_images/h11_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 27.5, 15), color="red")
IMG_DIR = "extracted_images/h12_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 27.5, 15), color="red")
IMG_DIR = "extracted_images/h13_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 27.5, 15), color="red")
IMG_DIR = "extracted_images/h14_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 25.5, 30), color="red")
IMG_DIR = "extracted_images/h15_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 25.5, 30), color="red")
IMG_DIR = "extracted_images/h16_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 25.5, 30), color="red")
IMG_DIR = "extracted_images/h17_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 25.5, 30), color="red")
IMG_DIR = "extracted_images/h18_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 29.5, 10), color="red")
IMG_DIR = "extracted_images/h19_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 29.5, 10), color="red")
IMG_DIR = "extracted_images/h20_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 29, 10), color="red")
IMG_DIR = "extracted_images/h21_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 29, 10), color="red")
IMG_DIR = "extracted_images/h22_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 29.5, 10), color="red")
IMG_DIR = "extracted_images/h23_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[10])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[330:630, 500:900], cmap="gray")
plt.plot(X, get_line(X, 18.5, 0), color="red")
IMG_DIR = "extracted_images/h24"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[10])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[330:630, 500:900], cmap="gray")
plt.plot(X, get_line(X, 20.5, 0), color="red")
IMG_DIR = "extracted_images/h25_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[10])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[330:630, 500:900], cmap="gray")
plt.plot(X, get_line(X, 19, 0), color="red")
IMG_DIR = "extracted_images/ref"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[10])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 24.5, 35), color="red")
IMG_DIR = "extracted_images/theta1_bounce"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 20.5, 0), color="red");
IMG_DIR = "extracted_images/theta1_pass"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 20.5, 0), color="red");
IMG_DIR = "extracted_images/theta2_bounce"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 22, -10), color="red");
IMG_DIR = "extracted_images/theta2_pass"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 22.5, -10), color="red");
IMG_DIR = "extracted_images/theta3_bounce"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 500, 1000)
plt.imshow(sample_image[300:730, 500:1000], cmap="gray")
plt.plot(X, get_line(X, 31, 5), color="red");
IMG_DIR = "extracted_images/theta3_pass"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 500, 1000)
plt.imshow(sample_image[300:730, 500:1000], cmap="gray")
plt.plot(X, get_line(X, 31, -5), color="red");
IMG_DIR = "extracted_images/theta5_bounce1"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[400:, 800:], cmap="gray")
plt.plot(X, get_line(X, 52.5, 5), color="red");
IMG_DIR = "extracted_images/theta5_bounce2"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[400:, 800:], cmap="gray")
plt.plot(X, get_line(X, 50.5, 8), color="red");
IMG_DIR = "extracted_images/theta5_pass3"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[400:, 800:], cmap="gray")
plt.plot(X, get_line(X, 56.5, -5), color="red");
IMG_DIR = "extracted_images/theta5_pass4"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[400:, 800:], cmap="gray")
plt.plot(X, get_line(X, 56.5, -5), color="red");
IMG_DIR = "extracted_images/theta5_pass5"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[400:, 800:], cmap="gray")
plt.plot(X, get_line(X, 54.5, -5), color="red");
IMG_DIR = "extracted_images/theta5_pass6"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[400:, 800:], cmap="gray")
plt.plot(X, get_line(X, 54.5, -5), color="red");
IMG_DIR = "extracted_images/theta6_bounce"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[400:, 800:], cmap="gray")
plt.plot(X, get_line(X, 46, 50), color="red");
IMG_DIR = "extracted_images/theta6_pass"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[400:, 800:], cmap="gray")
plt.plot(X, get_line(X, 46, 50), color="red");
IMG_DIR = "extracted_images/theta1_pass"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)
def get_line(X, theta, c):
theta = np.deg2rad(theta)
return np.tan(theta) * X + c
X = np.linspace(0, 400, 1000)
plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 20.5, 0), color="red");